package com.duoec.magichour.mapper;

import com.duoec.magichour.core.BaseMapper;
import com.duoec.magichour.pojo.Article;
import com.duoec.magichour.pojo.Product;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ProductMapper extends BaseMapper<Product, Long> {
    /**
     * 查询文章
     *
     * @param userId
     * @param keyword 查询的关键词
     * @param skip 跳过n条记录
     * @param limit 最多获取m条记录
     * @return
     */
    List<Product> search(
            @Param("userId") long userId,
            @Param("keyword") String keyword,
            @Param("skip") int skip,
            @Param("limit") int limit
    );

    List<Product> getByIds(@Param("productIds") List<Long> productIds);
}